package OOday02;

public class NewPerson {
    String name;
    int age;
    char gender;
    NewPerson(String name,int age,char gender){
        this.name=name;
        this.age=age;
        this.gender=gender;
    }
    void sleep(){
        System.out.println(age+"岁的"+name+"正在睡觉...");
    }
    void eat(){
        System.out.println(age+"岁的"+name+"正在吃饭...");
    }
}
class Doctor extends NewPerson{
    String doctor;
    Doctor(String name,int age,char gender,String doctor){
        super(name,age,gender);
        this.doctor=doctor;
    }
    void doing(){
        System.out.println(age+"岁的"+name+doctor+"正在做手术...");
    }
    void eat(){
        super.eat();
        System.out.println("撑死了");
    }
}
class Man extends NewPerson{
    Man(String name,int age,char gender){
        super(name,age,gender);
    }
}
